home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / misc / volume15 / dmake-3.6 / part02 < prev    next >
Encoding:
Text File  |  1990-10-14  |  39.5 KB  |  1,224 lines

  1. Newsgroups: comp.sources.misc
  2. X-UNIX-From: dvadura@watdragon.waterloo.edu
  3. subject: v15i054: dmake version 3.6 (part 02/25)
  4. from: Dennis Vadura <dvadura@watdragon.waterloo.edu>
  5. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  6.  
  7. Posting-number: Volume 15, Issue 54
  8. Submitted-by: Dennis Vadura <dvadura@watdragon.waterloo.edu>
  9. Archive-name: dmake-3.6/part02
  10.  
  11. #!/bin/sh
  12. # this is part 2 of a multipart archive
  13. # do not concatenate these parts, unpack them in order with /bin/sh
  14. # file unix/sysvr1/runargv.c continued
  15. #
  16. CurArch=2
  17. if test ! -r s2_seq_.tmp
  18. then echo "Please unpack part 1 first!"
  19.      exit 1; fi
  20. ( read Scheck
  21.   if test "$Scheck" != $CurArch
  22.   then echo "Please unpack part $Scheck next!"
  23.        exit 1;
  24.   else exit 0; fi
  25. ) < s2_seq_.tmp || exit 1
  26. echo "x - Continuing file unix/sysvr1/runargv.c"
  27. sed 's/^X//' << 'SHAR_EOF' >> unix/sysvr1/runargv.c
  28. X
  29. X   for( i=0; i<Max_proc; i++ )
  30. X      if( _procs[i].pr_valid &&
  31. X      _procs[i].pr_how == how &&
  32. X      _procs[i].pr_target == cp  )
  33. X     break;
  34. X     
  35. X   return( i != Max_proc );
  36. X}
  37. X
  38. X
  39. Xstatic void
  40. X_attach_cmd( cmd, group, ignore, cp, how, last, shell )
  41. Xchar    *cmd;
  42. Xint    group;
  43. Xint     ignore;
  44. XCELLPTR cp;
  45. XHOWPTR  how;
  46. Xint     last;
  47. Xint     shell;
  48. X{
  49. X   register int i;
  50. X   RCPPTR rp;
  51. X
  52. X   for( i=0; i<Max_proc; i++ )
  53. X      if( _procs[i].pr_valid &&
  54. X      _procs[i].pr_how == how &&
  55. X      _procs[i].pr_target == cp  )
  56. X     break;
  57. X
  58. X   TALLOC( rp, 1, RCP );
  59. X   rp->prp_cmd   = _strdup(cmd);
  60. X   rp->prp_group = group;
  61. X   rp->prp_ignore= ignore;
  62. X   rp->prp_last  = last;
  63. X   rp->prp_shell = shell;
  64. X   rp->prp_dir   = _strdup(Get_current_dir());
  65. X
  66. X   if( _procs[i].pr_recipe == NIL(RCP) )
  67. X      _procs[i].pr_recipe = _procs[i].pr_recipe_end = rp;
  68. X   else {
  69. X      _procs[i].pr_recipe_end->prp_next = rp;
  70. X      _procs[i].pr_recipe_end = rp;
  71. X   }
  72. X}
  73. SHAR_EOF
  74. echo "File unix/sysvr1/runargv.c is complete"
  75. chmod 0440 unix/sysvr1/runargv.c || echo "restore of unix/sysvr1/runargv.c fails"
  76. echo "x - extracting unix/sysvr1/putenv.c (Text)"
  77. sed 's/^X//' << 'SHAR_EOF' > unix/sysvr1/putenv.c &&
  78. X/* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/unix/sysvr1/RCS/putenv.c,v 1.1 90/10/06 12:06:30 dvadura Exp $
  79. X-- SYNOPSIS -- my own putenv for BSD like systems.
  80. X-- 
  81. X-- DESCRIPTION
  82. X--     This originally came from MKS, but I rewrote it to fix a bug with
  83. X--    replacing existing strings, probably never happened but the code
  84. X--    was wrong nonetheless.
  85. X--
  86. X-- AUTHOR
  87. X--      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  88. X--      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  89. X--
  90. X-- COPYRIGHT
  91. X--      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
  92. X-- 
  93. X--      This program is free software; you can redistribute it and/or
  94. X--      modify it under the terms of the GNU General Public License
  95. X--      (version 1), as published by the Free Software Foundation, and
  96. X--      found in the file 'LICENSE' included with this distribution.
  97. X-- 
  98. X--      This program is distributed in the hope that it will be useful,
  99. X--      but WITHOUT ANY WARRANTY; without even the implied warrant of
  100. X--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  101. X--      GNU General Public License for more details.
  102. X-- 
  103. X--      You should have received a copy of the GNU General Public License
  104. X--      along with this program;  if not, write to the Free Software
  105. X--      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  106. X--
  107. X-- LOG
  108. X--     $Log:    putenv.c,v $
  109. X * Revision 1.1  90/10/06  12:06:30  dvadura
  110. X * dmake Release, Version 3.6
  111. X * 
  112. X*/
  113. X
  114. X#include <stdio.h>
  115. X#include <string.h>
  116. X
  117. Xint
  118. Xputenv( str )/*
  119. X===============
  120. X   Take a string of the form NAME=value and stick it into the environment.
  121. X   We do this by allocating a new set of pointers if we have to add a new
  122. X   string and by replacing an existing pointer if the value replaces the value
  123. X   of an existing string. */
  124. Xchar *str;
  125. X{
  126. X   extern char **environ;        /* The current environment. */
  127. X   static char **ourenv = NULL;        /* A new environment        */
  128. X   register char **p;
  129. X   register char *q;
  130. X   int      size;
  131. X
  132. X   /* First search the current environment and see if we can replace a
  133. X    * string. */
  134. X   for( p=environ; *p; p++ ) {
  135. X      register char *s = str;
  136. X
  137. X      for( q = *p; *q && *s && *s == *q; q++, s++ )
  138. X     if( *s == '=' ) {
  139. X        *p = str;
  140. X        return(0);            /* replaced it so go away */
  141. X     }
  142. X   }
  143. X
  144. X   /* Ok, can't replace a string so need to grow the environment. */
  145. X   size = p - environ + 2;    /* size of new environment */
  146. X                /* size of old is size-1   */
  147. X
  148. X   /* It's the first time, so allocate a new environment since we don't know
  149. X    * where the old one is comming from. */
  150. X   if( ourenv == NULL ) {
  151. X      if( (ourenv = (char **) malloc( sizeof(char *)*size )) == NULL )
  152. X     return(1);
  153. X
  154. X      memcpy( (char *)ourenv, (char *)environ, (size-2)*sizeof(char *) );
  155. X   }
  156. X   else if( (ourenv = (char **)realloc( ourenv, size*sizeof(char *))) == NULL )
  157. X      return(1);
  158. X
  159. X   ourenv[--size] = NULL;
  160. X   ourenv[--size] = str;
  161. X
  162. X   environ = ourenv;
  163. X   return(0);
  164. X}
  165. SHAR_EOF
  166. chmod 0440 unix/sysvr1/putenv.c || echo "restore of unix/sysvr1/putenv.c fails"
  167. echo "x - extracting unix/sysvr1/make.sh (Text)"
  168. sed 's/^X//' << 'SHAR_EOF' > unix/sysvr1/make.sh &&
  169. Xmkdir objects
  170. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O infer.c
  171. Xmv infer.o objects
  172. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O make.c
  173. Xmv make.o objects
  174. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O stat.c
  175. Xmv stat.o objects
  176. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O expand.c
  177. Xmv expand.o objects
  178. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O string.c
  179. Xmv string.o objects
  180. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O hash.c
  181. Xmv hash.o objects
  182. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O dag.c
  183. Xmv dag.o objects
  184. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O dmake.c
  185. Xmv dmake.o objects
  186. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O path.c
  187. Xmv path.o objects
  188. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O imacs.c
  189. Xmv imacs.o objects
  190. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O sysintf.c
  191. Xmv sysintf.o objects
  192. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O parse.c
  193. Xmv parse.o objects
  194. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O getinp.c
  195. Xmv getinp.o objects
  196. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O quit.c
  197. Xmv quit.o objects
  198. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O basename.c
  199. Xmv basename.o objects
  200. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O dump.c
  201. Xmv dump.o objects
  202. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O macparse.c
  203. Xmv macparse.o objects
  204. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O rulparse.c
  205. Xmv rulparse.o objects
  206. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O percent.c
  207. Xmv percent.o objects
  208. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O function.c
  209. Xmv function.o objects
  210. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O unix/arlib.c
  211. Xmv arlib.o objects
  212. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O unix/dirbrk.c
  213. Xmv dirbrk.o objects
  214. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O unix/explode.c
  215. Xmv explode.o objects
  216. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O unix/rmprq.c
  217. Xmv rmprq.o objects
  218. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O unix/ruletab.c
  219. Xmv ruletab.o objects
  220. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O unix/sysvr1/runargv.c
  221. Xmv runargv.o objects
  222. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/sysvr1 -O unix/sysvr1/vfprintf.c
  223. Xmv vfprintf.o objects
  224. Xcc  -o dmake  objects/infer.o objects/make.o objects/stat.o objects/expand.o objects/string.o objects/hash.o objects/dag.o objects/dmake.o objects/path.o objects/imacs.o objects/sysintf.o objects/parse.o objects/getinp.o objects/quit.o objects/basename.o objects/dump.o objects/macparse.o objects/rulparse.o objects/percent.o objects/function.o objects/arlib.o objects/dirbrk.o objects/explode.o objects/rmprq.o objects/ruletab.o objects/runargv.o objects/vfprintf.o 
  225. SHAR_EOF
  226. chmod 0640 unix/sysvr1/make.sh || echo "restore of unix/sysvr1/make.sh fails"
  227. echo "x - extracting unix/sysvr1/config.mk (Text)"
  228. sed 's/^X//' << 'SHAR_EOF' > unix/sysvr1/config.mk &&
  229. X# This is the SysV R3 UNIX configuration file for DMAKE
  230. X#    It simply modifies the values of SRC, and checks to see if
  231. X#    OSENVIRONMENT is defined.  If so it includes the appropriate
  232. X#    config.mk file.
  233. X#
  234. X# It also sets the values of .SOURCE.c and .SOURCE.h to include the local
  235. X# directory.
  236. X#
  237. Xosrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
  238. X
  239. X# The following are required sources
  240. XOSDSRC := runargv.c vfprintf.c
  241. XSRC    += $(OSDSRC)
  242. X.SETDIR=$(osrdir) : $(OSDSRC)
  243. X
  244. X.SOURCE.h : $(osrdir)
  245. X
  246. X# Local configuration modifications for CFLAGS, there's local SysV includes
  247. X# too.
  248. XCFLAGS += -I$(osrdir)
  249. X
  250. X# See if we modify anything in the lower levels.
  251. X.IF $(OSENVIRONMENT) != $(NULL)
  252. X   .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
  253. X.END
  254. SHAR_EOF
  255. chmod 0640 unix/sysvr1/config.mk || echo "restore of unix/sysvr1/config.mk fails"
  256. echo "x - extracting unix/sysvr1/config.h (Text)"
  257. sed 's/^X//' << 'SHAR_EOF' > unix/sysvr1/config.h &&
  258. X/* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/unix/sysvr1/RCS/config.h,v 1.1 90/10/06 12:06:28 dvadura Exp $
  259. X-- SYNOPSIS -- Configurarion include file.
  260. X-- 
  261. X-- DESCRIPTION
  262. X--     There is one of these for each specific machine configuration.
  263. X--    It can be used to further tweek the machine specific sources
  264. X--    so that they compile.
  265. X--
  266. X-- AUTHOR
  267. X--      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  268. X--      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  269. X--
  270. X-- COPYRIGHT
  271. X--      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
  272. X-- 
  273. X--      This program is free software; you can redistribute it and/or
  274. X--      modify it under the terms of the GNU General Public License
  275. X--      (version 1), as published by the Free Software Foundation, and
  276. X--      found in the file 'LICENSE' included with this distribution.
  277. X-- 
  278. X--      This program is distributed in the hope that it will be useful,
  279. X--      but WITHOUT ANY WARRANTY; without even the implied warrant of
  280. X--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  281. X--      GNU General Public License for more details.
  282. X-- 
  283. X--      You should have received a copy of the GNU General Public License
  284. X--      along with this program;  if not, write to the Free Software
  285. X--      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  286. X--
  287. X-- LOG
  288. X--     $Log:    config.h,v $
  289. X * Revision 1.1  90/10/06  12:06:28  dvadura
  290. X * dmake Release, Version 3.6
  291. X * 
  292. X*/
  293. X
  294. X/* define this for configurations that don't have the coreleft function
  295. X * so that the code compiles.  To my knowledge coreleft exists only on
  296. X * Turbo C, but it is needed here since the function is used in many debug
  297. X * macros. */
  298. X#define coreleft() 0L
  299. X
  300. X/* Define the getcwd function that is used in the code, since BSD does
  301. X * not have getcwd, but call it getwd instead. */
  302. Xextern char *getcwd ANSI((char *, int));
  303. X
  304. X/* Define setvbuf, SysV doesn't have one */
  305. X#define setvbuf(fp, bp, type, len) setbuf( fp, NULL );
  306. X
  307. X/* need to define size_t */
  308. Xtypedef long size_t;
  309. SHAR_EOF
  310. chmod 0440 unix/sysvr1/config.h || echo "restore of unix/sysvr1/config.h fails"
  311. echo "x - extracting unix/sysintf.h (Text)"
  312. sed 's/^X//' << 'SHAR_EOF' > unix/sysintf.h &&
  313. X/*
  314. X** assorted bits of system interface, for common routines inside dmake.
  315. X** System specific code can be found in the config.h files for each
  316. X** of the system specifications.
  317. X*/
  318. X#include <sys/stat.h>
  319. X#include <signal.h>
  320. X
  321. X#define STAT stat
  322. X#define VOID_LCACHE(l,m) (void) void_lcache(l,m)
  323. X
  324. X/*
  325. X** standard C items
  326. X*/
  327. X#include "stdmacs.h"
  328. X
  329. X/*
  330. X** DOS interface standard items
  331. X*/
  332. X#define    getswitchar()    '-'
  333. X
  334. X/*
  335. X** make parameters
  336. X*/
  337. X#define    MAX_PATH_LEN    1024
  338. SHAR_EOF
  339. chmod 0440 unix/sysintf.h || echo "restore of unix/sysintf.h fails"
  340. echo "x - extracting unix/startup.h (Text)"
  341. sed 's/^X//' << 'SHAR_EOF' > unix/startup.h &&
  342. X/* This file contains the default value of the MAKESTARTUP variable.
  343. X * You must set the quoted string below to the default path to the startup
  344. X * variable, so that it gets compiled in.  LEAVE ROOTDIR at the front of
  345. X * the path.  This allows the user to customize his environment for dmake
  346. X * by setting up a new ROOTDIR environment variable. */
  347. X
  348. X"MAKESTARTUP := $(ROOTDIR)/usr/software/dmake/data/startup.mk",
  349. SHAR_EOF
  350. chmod 0440 unix/startup.h || echo "restore of unix/startup.h fails"
  351. echo "x - extracting unix/ruletab.c (Text)"
  352. sed 's/^X//' << 'SHAR_EOF' > unix/ruletab.c &&
  353. X/* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/unix/RCS/ruletab.c,v 1.1 90/10/06 12:07:08 dvadura Exp $
  354. X-- SYNOPSIS -- Default initial configuration of dmake.
  355. X-- 
  356. X-- DESCRIPTION
  357. X--     Define here the initial set of rules that are defined before
  358. X--    dmake performs any processing.
  359. X--
  360. X-- AUTHOR
  361. X--      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  362. X--      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  363. X--
  364. X-- COPYRIGHT
  365. X--      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
  366. X-- 
  367. X--      This program is free software; you can redistribute it and/or
  368. X--      modify it under the terms of the GNU General Public License
  369. X--      (version 1), as published by the Free Software Foundation, and
  370. X--      found in the file 'LICENSE' included with this distribution.
  371. X-- 
  372. X--      This program is distributed in the hope that it will be useful,
  373. X--      but WITHOUT ANY WARRANTY; without even the implied warrant of
  374. X--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  375. X--      GNU General Public License for more details.
  376. X-- 
  377. X--      You should have received a copy of the GNU General Public License
  378. X--      along with this program;  if not, write to the Free Software
  379. X--      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  380. X--
  381. X-- LOG
  382. X--     $Log:    ruletab.c,v $
  383. X * Revision 1.1  90/10/06  12:07:08  dvadura
  384. X * dmake Release, Version 3.6
  385. X * 
  386. X*/
  387. X
  388. X/* These are control macros for dmake that MUST be defined at some point
  389. X * if they are NOT dmake will not work!  These are default definitions.  They
  390. X * may be overridden inside the .STARTUP makefile, they are here
  391. X * strictly so that dmake can parse the STARTUP makefile */
  392. X
  393. Xstatic char *_rules[] = {
  394. X    "MAXPROCESSLIMIT := 10",
  395. X    "MAXLINELENGTH := 8190",
  396. X    ".IMPORT .IGNORE: ROOTDIR",
  397. X    ".MAKEFILES : makefile.mk Makefile makefile",
  398. X    ".SOURCE    : .NULL",
  399. X#include "startup.h"
  400. X    0 };
  401. X
  402. Xchar **Rule_tab = _rules; /* for sundry reasons in Get_environment() */
  403. SHAR_EOF
  404. chmod 0440 unix/ruletab.c || echo "restore of unix/ruletab.c fails"
  405. echo "x - extracting unix/rmprq.c (Text)"
  406. sed 's/^X//' << 'SHAR_EOF' > unix/rmprq.c &&
  407. X/* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/unix/RCS/rmprq.c,v 1.1 90/10/06 12:07:06 dvadura Exp $
  408. X-- SYNOPSIS -- remove prerequisites code.
  409. X-- 
  410. X-- DESCRIPTION
  411. X--    This code is different for DOS and for UNIX and parallel make
  412. X--    architectures since the parallel case requires the rm's to be
  413. X--    run in parallel, whereas DOS guarantees to run them sequentially.
  414. X-- 
  415. X-- AUTHOR
  416. X--      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  417. X--      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  418. X--
  419. X-- COPYRIGHT
  420. X--      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
  421. X-- 
  422. X--      This program is free software; you can redistribute it and/or
  423. X--      modify it under the terms of the GNU General Public License
  424. X--      (version 1), as published by the Free Software Foundation, and
  425. X--      found in the file 'LICENSE' included with this distribution.
  426. X-- 
  427. X--      This program is distributed in the hope that it will be useful,
  428. X--      but WITHOUT ANY WARRANTY; without even the implied warrant of
  429. X--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  430. X--      GNU General Public License for more details.
  431. X-- 
  432. X--      You should have received a copy of the GNU General Public License
  433. X--      along with this program;  if not, write to the Free Software
  434. X--      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  435. X--
  436. X-- LOG
  437. X--     $Log:    rmprq.c,v $
  438. X * Revision 1.1  90/10/06  12:07:06  dvadura
  439. X * dmake Release, Version 3.6
  440. X * 
  441. X*/
  442. X
  443. X#include "extern.h"
  444. X#include "alloc.h"
  445. X
  446. Xvoid
  447. XRemove_prq( tcp )
  448. XCELLPTR tcp;
  449. X{
  450. X   static  LINKPTR rlp = NIL(LINK);
  451. X   static  flag = 0;
  452. X   static  HASHPTR m_at, m_q, m_b, m_g, m_l, m_bb, m_up;
  453. X   char    *m_at_s, *m_g_s, *m_q_s, *m_b_s, *m_l_s, *m_bb_s, *m_up_s;
  454. X   LINKPTR tlp;
  455. X
  456. X   tcp->ce_flag         &= ~(F_MADE|F_VISITED);
  457. X   tcp->CE_HOW->hw_flag &= ~(F_MADE|F_VISITED);
  458. X   tcp->ce_time          = 0L;
  459. X
  460. X   for( tlp=rlp; tlp !=NIL(LINK); tlp=tlp->cl_next )
  461. X      if( (tlp->cl_prq->ce_flag & (F_VISITED|F_MADE)) != F_VISITED )
  462. X     break;
  463. X
  464. X   if( tlp == NIL(LINK) ) {
  465. X      TALLOC(tlp, 1, LINK);
  466. X      TALLOC(tlp->cl_prq, 1, CELL);
  467. X      tlp->cl_next = rlp;
  468. X      rlp = tlp;
  469. X   }
  470. X
  471. X   *tlp->cl_prq = *tcp;
  472. X
  473. X   /* We save the dynamic macro values here, as it is possible that the
  474. X    * .REMOVE recipe is getting executed for a target while some other target
  475. X    * is in the middle of executing it's list of recipe lines, in this case
  476. X    * the values of $@ etc, must be preserved so that when we return to
  477. X    * complete the other recipe we must make certain that the values of it's
  478. X    * dynamic macros are unmodified. */
  479. X
  480. X   if( !flag ) {
  481. X      /* Do the getting of the macros only once. */
  482. X      flag = 1;
  483. X      m_at = Get_name("@", Macs, TRUE, NIL(CELL));
  484. X      m_g  = Get_name(">", Macs, TRUE, NIL(CELL));
  485. X      m_q  = Get_name("?", Macs, TRUE, NIL(CELL));
  486. X      m_b  = Get_name("<", Macs, TRUE, NIL(CELL));
  487. X      m_l  = Get_name("&", Macs, TRUE, NIL(CELL));
  488. X      m_bb = Get_name("*", Macs, TRUE, NIL(CELL));
  489. X      m_up = Get_name("^", Macs, TRUE, NIL(CELL));
  490. X   }
  491. X
  492. X   m_at_s = m_at->ht_value; m_at->ht_value = NIL(char);
  493. X   m_g_s  = m_g->ht_value;  m_g->ht_value  = NIL(char);
  494. X   m_q_s  = m_q->ht_value;  m_q->ht_value  = NIL(char);
  495. X   m_b_s  = m_b->ht_value;  m_b->ht_value  = NIL(char);
  496. X   m_l_s  = m_l->ht_value;  m_l->ht_value  = NIL(char);
  497. X   m_bb_s = m_bb->ht_value; m_bb->ht_value = NIL(char);
  498. X   m_up_s = m_up->ht_value; m_up->ht_value = NIL(char);
  499. X
  500. X   Make( tlp->cl_prq, tlp->cl_prq->CE_HOW, NIL(CELL) );
  501. X
  502. X   m_at->ht_value = m_at_s;
  503. X   m_g->ht_value  = m_g_s;
  504. X   m_q->ht_value  = m_q_s;
  505. X   m_b->ht_value  = m_b_s;
  506. X   m_l->ht_value  = m_l_s;
  507. X   m_bb->ht_value = m_bb_s;
  508. X   m_up->ht_value = m_up_s;
  509. X}
  510. SHAR_EOF
  511. chmod 0440 unix/rmprq.c || echo "restore of unix/rmprq.c fails"
  512. echo "x - extracting unix/explode.c (Text)"
  513. sed 's/^X//' << 'SHAR_EOF' > unix/explode.c &&
  514. X/* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/unix/RCS/explode.c,v 1.1 90/10/06 12:07:03 dvadura Exp $
  515. X-- SYNOPSIS -- Routines to explode dag if .SETDIR targets present.
  516. X-- 
  517. X-- DESCRIPTION
  518. X--    These routines are called by parallel dmake implementations to
  519. X--    explode the dmake DAG at .SETDIR targets so that parallel makes
  520. X--    can traverse common portions of the DAG in parallel.
  521. X-- 
  522. X-- AUTHOR
  523. X--      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  524. X--      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  525. X--
  526. X-- COPYRIGHT
  527. X--      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
  528. X-- 
  529. X--      This program is free software; you can redistribute it and/or
  530. X--      modify it under the terms of the GNU General Public License
  531. X--      (version 1), as published by the Free Software Foundation, and
  532. X--      found in the file 'LICENSE' included with this distribution.
  533. X-- 
  534. X--      This program is distributed in the hope that it will be useful,
  535. X--      but WITHOUT ANY WARRANTY; without even the implied warrant of
  536. X--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  537. X--      GNU General Public License for more details.
  538. X-- 
  539. X--      You should have received a copy of the GNU General Public License
  540. X--      along with this program;  if not, write to the Free Software
  541. X--      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  542. X--
  543. X-- LOG
  544. X--     $Log:    explode.c,v $
  545. X * Revision 1.1  90/10/06  12:07:03  dvadura
  546. X * dmake Release, Version 3.6
  547. X * 
  548. X*/
  549. X
  550. X#include "extern.h"
  551. X#include "alloc.h"
  552. X#include "db.h"
  553. X
  554. XCELLPTR
  555. XExplode_cell( cp, dir )
  556. XCELLPTR cp;
  557. XCELLPTR dir;
  558. X{
  559. X   int explode = FALSE;
  560. X   CELLPTR root;
  561. X   CELLPTR tcp;
  562. X   CELLPTR ocp;
  563. X   HOWPTR  fhow = NIL(HOW);
  564. X
  565. X
  566. X   if( cp == NIL(CELL) ) return(cp);
  567. X
  568. X   ocp = cp;
  569. X   if( (root = cp->ce_name->CP_ROOT) != dir ) {
  570. X      if( cp->ce_name->CP_ROOT != NIL(CELL) ) {
  571. X     HASHPTR name;
  572. X
  573. X     tcp  = Def_cell(cp->CE_NAME, dir);
  574. X     name = tcp->ce_name;
  575. X     *tcp = *cp;
  576. X     tcp->ce_name = name;
  577. X
  578. X     cp = tcp;
  579. X     explode = TRUE;
  580. X      }
  581. X   }
  582. X   else if( root && root == dir )
  583. X      return( cp );
  584. X
  585. X   /* The code here is required, as it takes care of the .UPDATEALL common
  586. X    * targets. */
  587. X   tcp = cp;
  588. X   do {
  589. X      tcp->ce_name->CP_ROOT = dir;
  590. X
  591. X      if( tcp->CE_HOW != fhow ) {
  592. X     tcp->CE_HOW = Explode_how( tcp->CE_HOW, cp->ce_dir?cp:dir, explode );
  593. X     if( tcp == cp ) fhow = tcp->CE_HOW;
  594. X      }
  595. X
  596. X      if( explode && tcp->ce_all )
  597. X         if( tcp->ce_all != ocp ) {
  598. X        CELLPTR ttcp = Def_cell( tcp->ce_all->CE_NAME, dir );
  599. X        HASHPTR name = ttcp->ce_name;
  600. X
  601. X        *ttcp = *tcp->ce_all;
  602. X        ttcp->ce_name = name;
  603. X        tcp->ce_all   = ttcp;
  604. X        ttcp->CE_HOW  = fhow;
  605. X     }
  606. X     else
  607. X        tcp->ce_all = cp;
  608. X
  609. X      tcp = tcp->ce_all;
  610. X   }
  611. X   while( tcp != NIL(CELL) && tcp != cp );
  612. X
  613. X   return( cp );
  614. X}
  615. X
  616. X
  617. XHOWPTR
  618. XExplode_how( how, dir, copy )
  619. XHOWPTR  how;
  620. XCELLPTR dir;
  621. Xint     copy;
  622. X{
  623. X   if( how == NIL(HOW) ) return( how );
  624. X
  625. X   if( copy ) {
  626. X      HOWPTR thow;
  627. X
  628. X      TALLOC( thow, 1, HOW );
  629. X      *thow = *how;
  630. X      how = thow;
  631. X   }
  632. X
  633. X   how->hw_next = Explode_how( how->hw_next, dir, copy );
  634. X   how->hw_prq  = Explode_prq( how->hw_prq, dir, copy );
  635. X
  636. X   return( how );
  637. X}
  638. X
  639. X
  640. XLINKPTR
  641. XExplode_prq( prq, dir, copy )
  642. XLINKPTR prq;
  643. XCELLPTR dir;
  644. Xint     copy;
  645. X{
  646. X   if( prq == NIL(LINK) ) return(prq);
  647. X
  648. X   if( copy ) {
  649. X      LINKPTR tprq;
  650. X
  651. X      TALLOC( tprq, 1, LINK );
  652. X      *tprq = *prq;
  653. X      prq = tprq;
  654. X   }
  655. X
  656. X   prq->cl_next = Explode_prq( prq->cl_next, dir, copy );
  657. X   prq->cl_prq  = Explode_cell( prq->cl_prq, dir );
  658. X
  659. X   return( prq );
  660. X}
  661. SHAR_EOF
  662. chmod 0440 unix/explode.c || echo "restore of unix/explode.c fails"
  663. echo "x - extracting unix/dirbrk.c (Text)"
  664. sed 's/^X//' << 'SHAR_EOF' > unix/dirbrk.c &&
  665. X/* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/unix/RCS/dirbrk.c,v 1.1 90/10/06 12:07:00 dvadura Exp $
  666. X-- SYNOPSIS -- define the directory separator string.
  667. X-- 
  668. X-- DESCRIPTION
  669. X--     Define this string for any character that may appear in a path name
  670. X--    and can be used as a directory separator.  Also provide a function
  671. X--    to indicate if a given path begins at the root of the file system.
  672. X--
  673. X-- AUTHOR
  674. X--      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  675. X--      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  676. X--
  677. X-- COPYRIGHT
  678. X--      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
  679. X-- 
  680. X--      This program is free software; you can redistribute it and/or
  681. X--      modify it under the terms of the GNU General Public License
  682. X--      (version 1), as published by the Free Software Foundation, and
  683. X--      found in the file 'LICENSE' included with this distribution.
  684. X-- 
  685. X--      This program is distributed in the hope that it will be useful,
  686. X--      but WITHOUT ANY WARRANTY; without even the implied warrant of
  687. X--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  688. X--      GNU General Public License for more details.
  689. X-- 
  690. X--      You should have received a copy of the GNU General Public License
  691. X--      along with this program;  if not, write to the Free Software
  692. X--      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  693. X--
  694. X-- LOG
  695. X--     $Log:    dirbrk.c,v $
  696. X * Revision 1.1  90/10/06  12:07:00  dvadura
  697. X * dmake Release, Version 3.6
  698. X * 
  699. X*/
  700. X
  701. X#include "extern.h"
  702. X
  703. X/* Unix only uses / */
  704. Xchar*    DirBrkStr = "/";
  705. X
  706. X/*
  707. X** Return TRUE if the name is the full specification of a path name to a file
  708. X** starting at the root of the file system, otherwise return FALSE
  709. X*/
  710. Xint
  711. XIf_root_path(name)
  712. Xchar *name;
  713. X{
  714. X   return( strchr(DirBrkStr, *name) != NIL(char) );
  715. X}
  716. SHAR_EOF
  717. chmod 0440 unix/dirbrk.c || echo "restore of unix/dirbrk.c fails"
  718. echo "x - extracting unix/config.mk (Text)"
  719. sed 's/^X//' << 'SHAR_EOF' > unix/config.mk &&
  720. X# This is an OS specific configuration file
  721. X#    It assumes that OBJDIR, TARGET and DEBUG are previously defined.
  722. X#    It defines    CFLAGS, LDARGS, CPPFLAGS, STARTUPFILE, LDOBJS
  723. X#            PRINTER, PRINTFLAGS
  724. X#    It augments    SRC, OBJDIR, TARGET, CFLAGS, LDLIBS
  725. X#
  726. XPRINTER        = hw
  727. XPRINTFLAGS    = -P$(PRINTER)
  728. XSTARTUPFILE    = $(OS)/startup.mk
  729. XCPPFLAGS     = $(CFLAGS)
  730. XLDOBJS        = $(CSTARTUP) $(OBJDIR)/{$(<:f)}
  731. XLDARGS        = $(LDFLAGS) -o $@ $(LDOBJS) $(LDLIBS)
  732. X
  733. X# Debug flags
  734. XDB_CFLAGS    = -g -DDBUG
  735. XDB_LDFLAGS    = -g
  736. XDB_LDLIBS    =
  737. X
  738. X# NO Debug flags
  739. XNDB_CFLAGS    = -O
  740. XNDB_LDFLAGS    =
  741. XNDB_LDLIBS    =
  742. X
  743. X# Local configuration modifications for CFLAGS.
  744. XCFLAGS         += -I$(OS)
  745. X
  746. X# Sources that must be defined for each different version
  747. XOSSRC := arlib.c dirbrk.c explode.c rmprq.c ruletab.c
  748. XSRC  += $(OSSRC)
  749. X.SETDIR=$(OS) : $(OSSRC)
  750. X
  751. X# Set source dirs so that we can find files named in this
  752. X# config file.
  753. X.SOURCE.h : $(OS)
  754. X
  755. X# See if we modify anything in the lower levels.
  756. X.IF $(OSRELEASE) != $(NULL)
  757. X   .INCLUDE .IGNORE : $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)config.mk
  758. X.END
  759. X
  760. X# Set the proper macros based on whether we are making the debugging version
  761. X# or not.
  762. X.IF $(DEBUG)
  763. X   CFLAGS    += $(DB_CFLAGS)
  764. X   LDFLAGS    += $(DB_LDFLAGS)
  765. X   LDLIBS    += $(DB_LDLIBS)
  766. X
  767. X   SILENT    := $(.SILENT)
  768. X   .SILENT    := yes
  769. X   TARGET    := db$(TARGET)
  770. X   OBJDIR    := $(OBJDIR).dbg
  771. X   .SILENT    := $(SILENT)
  772. X
  773. X    SRC        += dbug.c malloc.c
  774. X    HDR        += db.h 
  775. X    .SETDIR=common : dbug.c malloc.c
  776. X.ELSE
  777. X   CFLAGS    += $(NDB_CFLAGS)
  778. X   LDFLAGS    += $(NDB_LDFLAGS)
  779. X   LDLIBS    += $(NDB_LDLIBS)
  780. X.END
  781. SHAR_EOF
  782. chmod 0640 unix/config.mk || echo "restore of unix/config.mk fails"
  783. echo mkdir - unix/bsd43
  784. mkdir unix/bsd43
  785. echo mkdir - unix/bsd43/vf
  786. mkdir unix/bsd43/vf
  787. echo "x - extracting unix/bsd43/vf/vfprintf.c (Text)"
  788. sed 's/^X//' << 'SHAR_EOF' > unix/bsd43/vf/vfprintf.c &&
  789. X/*
  790. X * Copyright (c) 1988 Regents of the University of California.
  791. X * All rights reserved.
  792. X *
  793. X * Redistribution and use in source and binary forms are permitted
  794. X * provided that the above copyright notice and this paragraph are
  795. X * duplicated in all such forms and that any documentation,
  796. X * advertising materials, and other materials related to such
  797. X * distribution and use acknowledge that the software was developed
  798. X * by the University of California, Berkeley.  The name of the
  799. X * University may not be used to endorse or promote products derived
  800. X * from this software without specific prior written permission.
  801. X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  802. X * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  803. X * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  804. X */
  805. X
  806. X#if defined(LIBC_SCCS) && !defined(lint)
  807. Xstatic char sccsid[] = "@(#)vfprintf.c    5.2 (Berkeley) 6/27/88";
  808. X#endif /* LIBC_SCCS and not lint */
  809. X
  810. X#include <stdio.h>
  811. X#include <varargs.h>
  812. X
  813. Xint
  814. Xvfprintf(iop, fmt, ap)
  815. X    FILE *iop;
  816. X    char *fmt;
  817. X    va_list ap;
  818. X{
  819. X    int len;
  820. X    char localbuf[BUFSIZ];
  821. X
  822. X    if (iop->_flag & _IONBF) {
  823. X        iop->_flag &= ~_IONBF;
  824. X        iop->_ptr = iop->_base = localbuf;
  825. X        len = _doprnt(fmt, ap, iop);
  826. X        (void) fflush(iop);
  827. X        iop->_flag |= _IONBF;
  828. X        iop->_base = NULL;
  829. X        iop->_bufsiz = 0;
  830. X        iop->_cnt = 0;
  831. X    } else
  832. X        len = _doprnt(fmt, ap, iop);
  833. X
  834. X    return (ferror(iop) ? EOF : len);
  835. X}
  836. X
  837. SHAR_EOF
  838. chmod 0440 unix/bsd43/vf/vfprintf.c || echo "restore of unix/bsd43/vf/vfprintf.c fails"
  839. echo "x - extracting unix/bsd43/vf/startup.mk (Text)"
  840. sed 's/^X//' << 'SHAR_EOF' > unix/bsd43/vf/startup.mk &&
  841. X# Generic UNIX DMAKE startup file.  Customize to suit your needs.
  842. X# Should work for both SYSV, and BSD 4.3
  843. X# See the documentation for a description of internally defined macros.
  844. X#
  845. X# Disable warnings for macros redefined here that were given
  846. X# on the command line.
  847. X__.SILENT := $(.SILENT)
  848. X.SILENT   := yes
  849. X
  850. X# Configuration parameters for DMAKE startup.mk file
  851. X# Set these to NON-NULL if you wish to turn the parameter on.
  852. X_HAVE_RCS    := yes        # yes => RCS  is installed.
  853. X_HAVE_SCCS    := yes        # yes => SCCS is installed.
  854. X
  855. X# Applicable suffix definitions
  856. XA := .a        # Libraries
  857. XE :=        # Executables
  858. XF := .f        # Fortran
  859. XO := .o        # Objects
  860. XP := .p        # Pascal
  861. XS := .s        # Assembler sources
  862. XV := ,v        # RCS suffix
  863. X
  864. X# Recipe execution configurations
  865. XSHELL        := /bin/sh
  866. XSHELLFLAGS    := -ce
  867. XGROUPSHELL    := $(SHELL)
  868. XGROUPFLAGS    := 
  869. XSHELLMETAS    := |();&<>?*][$$:\\#`'"
  870. XGROUPSUFFIX    :=
  871. XDIVFILE         = $(TMPFILE)
  872. X
  873. X# Standard C-language command names and flags
  874. X   CPP       := /lib/cpp        # C-preprocessor
  875. X   CC      := cc        # C-compiler and flags
  876. X   CFLAGS  +=
  877. X
  878. X   AS      := as        # Assembler and flags
  879. X   ASFLAGS += 
  880. X
  881. X   LD       = $(CC)        # Loader and flags
  882. X   LDFLAGS +=
  883. X   LDLIBS   =
  884. X
  885. X# Definition of $(MAKE) macro for recursive makes.
  886. X   MAKE = $(MAKECMD) $(MFLAGS)
  887. X
  888. X# Definition of Print command for this system.
  889. X   PRINT = lpr
  890. X
  891. X# Language and Parser generation Tools and their flags
  892. X   YACC      := yacc        # standard yacc
  893. X   YFLAGS +=
  894. X   YTAB      := y.tab        # yacc output files name stem.
  895. X
  896. X   LEX      := lex        # standard lex
  897. X   LFLAGS +=
  898. X   LEXYY  := lex.yy        # lex output file
  899. X
  900. X# Other Compilers, Tools and their flags
  901. X   PC    := pc            # pascal compiler
  902. X   RC    := f77            # ratfor compiler
  903. X   FC    := f77            # fortran compiler
  904. X
  905. X   CO       := co        # check out for RCS
  906. X   COFLAGS += -q
  907. X
  908. X   AR     := ar            # archiver
  909. X   ARFLAGS+= ruv
  910. X
  911. X   RM       := /bin/rm        # remove a file command
  912. X   RMFLAGS +=
  913. X
  914. X# Implicit generation rules for making inferences.
  915. X# We don't provide .yr or .ye rules here.  They're obsolete.
  916. X# Rules for making *$O
  917. X   %$O : %.c ; $(CC) $(CFLAGS) -c $<
  918. X   %$O : %$P ; $(PC) $(PFLAGS) -c $<
  919. X   %$O : %$S ; $(AS) $(ASFLAGS) $<
  920. X   %$O : %.cl ; class -c $<
  921. X   %$O : %.e %.r %.F %$F
  922. X    $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
  923. X
  924. X# Executables
  925. X   %$E : %$O ; $(LD) $(LDFLAGS) -o $@ $< $(LDLIBES)
  926. X
  927. X# lex and yacc rules
  928. X   %.c : %.y ; $(YACC)  $(YFLAGS) $<; mv $(YTAB).c $@
  929. X   %.c : %.l ; $(LEX)   $(LFLAGS) $<; mv $(LEXYY).c $@
  930. X
  931. X# This rule tells how to make *.out from it's immediate list of prerequisites
  932. X# UNIX only.
  933. X   %.out :; $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
  934. X
  935. X# RCS support
  936. X.IF $(_HAVE_RCS)
  937. X   % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
  938. X   .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
  939. X.END
  940. X
  941. X# SCCS support
  942. X.IF $(_HAVE_SCCS)
  943. X   % : s.% ; get $@
  944. X   .NOINFER : s.%
  945. X.END
  946. X
  947. X# Recipe to make archive files.
  948. X%$A :
  949. X[
  950. X   $(AR) $(ARFLAGS) $@ $?
  951. X   $(RM) $(RMFLAGS) $?
  952. X   ranlib $@
  953. X]
  954. X
  955. X# DMAKE uses this recipe to remove intermediate targets
  956. X.REMOVE :; $(RM) -f $<
  957. X
  958. X# AUGMAKE extensions for SYSV compatibility
  959. X@B = $(@:b)
  960. X@D = $(@:d)
  961. X@F = $(@:f)
  962. X*B = $(*:b)
  963. X*D = $(*:d)
  964. X*F = $(*:f)
  965. X<B = $(<:b)
  966. X<D = $(<:d)
  967. X<F = $(<:f)
  968. X?B = $(?:b)
  969. X?F = $(?:f)
  970. X?D = $(?:d)
  971. X
  972. X# Turn warnings back to previous setting.
  973. X.SILENT := $(__.SILENT)
  974. X
  975. X# Local startup file if any
  976. X.INCLUDE .IGNORE: "_startup.mk"
  977. SHAR_EOF
  978. chmod 0640 unix/bsd43/vf/startup.mk || echo "restore of unix/bsd43/vf/startup.mk fails"
  979. echo "x - extracting unix/bsd43/vf/memcpy.c (Text)"
  980. sed 's/^X//' << 'SHAR_EOF' > unix/bsd43/vf/memcpy.c &&
  981. Xchar *
  982. Xmemcpy(t, f, n)
  983. Xregister char *t, *f;
  984. Xregister n;
  985. X{
  986. X   register char *p = t;
  987. X
  988. X   while( --n >= 0 ) *t++ = *f++;
  989. X
  990. X   return (p);
  991. X}
  992. SHAR_EOF
  993. chmod 0440 unix/bsd43/vf/memcpy.c || echo "restore of unix/bsd43/vf/memcpy.c fails"
  994. echo "x - extracting unix/bsd43/vf/make.sh (Text)"
  995. sed 's/^X//' << 'SHAR_EOF' > unix/bsd43/vf/make.sh &&
  996. Xmkdir objects
  997. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O infer.c
  998. Xmv infer.o objects
  999. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O make.c
  1000. Xmv make.o objects
  1001. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O stat.c
  1002. Xmv stat.o objects
  1003. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O expand.c
  1004. Xmv expand.o objects
  1005. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O string.c
  1006. Xmv string.o objects
  1007. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O hash.c
  1008. Xmv hash.o objects
  1009. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O dag.c
  1010. Xmv dag.o objects
  1011. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O dmake.c
  1012. Xmv dmake.o objects
  1013. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O path.c
  1014. Xmv path.o objects
  1015. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O imacs.c
  1016. Xmv imacs.o objects
  1017. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O sysintf.c
  1018. Xmv sysintf.o objects
  1019. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O parse.c
  1020. Xmv parse.o objects
  1021. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O getinp.c
  1022. Xmv getinp.o objects
  1023. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O quit.c
  1024. Xmv quit.o objects
  1025. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O basename.c
  1026. Xmv basename.o objects
  1027. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O dump.c
  1028. Xmv dump.o objects
  1029. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O macparse.c
  1030. Xmv macparse.o objects
  1031. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O rulparse.c
  1032. Xmv rulparse.o objects
  1033. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O percent.c
  1034. Xmv percent.o objects
  1035. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O function.c
  1036. Xmv function.o objects
  1037. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/arlib.c
  1038. Xmv arlib.o objects
  1039. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/dirbrk.c
  1040. Xmv dirbrk.o objects
  1041. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/explode.c
  1042. Xmv explode.o objects
  1043. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/rmprq.c
  1044. Xmv rmprq.o objects
  1045. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/ruletab.c
  1046. Xmv ruletab.o objects
  1047. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/bsd43/putenv.c
  1048. Xmv putenv.o objects
  1049. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/bsd43/tempnam.c
  1050. Xmv tempnam.o objects
  1051. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/bsd43/utime.c
  1052. Xmv utime.o objects
  1053. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/bsd43/setvbuf.c
  1054. Xmv setvbuf.o objects
  1055. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/bsd43/runargv.c
  1056. Xmv runargv.o objects
  1057. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/bsd43/vf/memcpy.c
  1058. Xmv memcpy.o objects
  1059. Xcc -c -DHELP -I. -Icommon -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/bsd43/vf/vfprintf.c
  1060. Xmv vfprintf.o objects
  1061. Xcc  -o dmake  objects/infer.o objects/make.o objects/stat.o objects/expand.o objects/string.o objects/hash.o objects/dag.o objects/dmake.o objects/path.o objects/imacs.o objects/sysintf.o objects/parse.o objects/getinp.o objects/quit.o objects/basename.o objects/dump.o objects/macparse.o objects/rulparse.o objects/percent.o objects/function.o objects/arlib.o objects/dirbrk.o objects/explode.o objects/rmprq.o objects/ruletab.o objects/putenv.o objects/tempnam.o objects/utime.o objects/setvbuf.o objects/runargv.o objects/memcpy.o objects/vfprintf.o 
  1062. SHAR_EOF
  1063. chmod 0640 unix/bsd43/vf/make.sh || echo "restore of unix/bsd43/vf/make.sh fails"
  1064. echo "x - extracting unix/bsd43/vf/ctype.h (Text)"
  1065. sed 's/^X//' << 'SHAR_EOF' > unix/bsd43/vf/ctype.h &&
  1066. X/*    ctype.h    4.2    85/09/04    */
  1067. X
  1068. X#define    _U    01
  1069. X#define    _L    02
  1070. X#define    _N    04
  1071. X#define    _S    010
  1072. X#define _P    020
  1073. X#define _C    040
  1074. X#define _X    0100
  1075. X#define    _B    0200
  1076. X
  1077. Xextern    char    _ctype_[];
  1078. X
  1079. X#define    isalpha(c)    ((_ctype_+1)[c]&(_U|_L))
  1080. X#define    isupper(c)    ((_ctype_+1)[c]&_U)
  1081. X#define    islower(c)    ((_ctype_+1)[c]&_L)
  1082. X#define    isdigit(c)    ((_ctype_+1)[c]&_N)
  1083. X#define    isxdigit(c)    ((_ctype_+1)[c]&(_N|_X))
  1084. X#define    isspace(c)    ((_ctype_+1)[c]&_S)
  1085. X#define ispunct(c)    ((_ctype_+1)[c]&_P)
  1086. X#define isalnum(c)    ((_ctype_+1)[c]&(_U|_L|_N))
  1087. X#define isprint(c)    ((_ctype_+1)[c]&(_P|_U|_L|_N|_B))
  1088. X#define isgraph(c)    ((_ctype_+1)[c]&(_P|_U|_L|_N))
  1089. X#define iscntrl(c)    ((_ctype_+1)[c]&_C)
  1090. X#define isascii(c)    ((unsigned)(c)<=0177)
  1091. X#define toupper(c)    ((c)-'a'+'A')
  1092. X#define tolower(c)    ((c)-'A'+'a')
  1093. X#define toascii(c)    ((c)&0177)
  1094. SHAR_EOF
  1095. chmod 0440 unix/bsd43/vf/ctype.h || echo "restore of unix/bsd43/vf/ctype.h fails"
  1096. echo "x - extracting unix/bsd43/vf/config.mk (Text)"
  1097. sed 's/^X//' << 'SHAR_EOF' > unix/bsd43/vf/config.mk &&
  1098. X# This config file adds vfprintf.c and memcpy.c for those systems that
  1099. X# do not have it.
  1100. X#
  1101. X
  1102. Xosredir := $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)$(OSENVIRONMENT)
  1103. X
  1104. X# The following sources are required for BSD4.3
  1105. XOSDESRC := memcpy.c vfprintf.c
  1106. XSRC    += $(OSDESRC)
  1107. X.SETDIR=$(osredir) : $(OSDESRC)
  1108. X
  1109. XCFLAGS += -I$(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)
  1110. SHAR_EOF
  1111. chmod 0640 unix/bsd43/vf/config.mk || echo "restore of unix/bsd43/vf/config.mk fails"
  1112. echo mkdir - unix/bsd43/uw
  1113. mkdir unix/bsd43/uw
  1114. echo "x - extracting unix/bsd43/uw/startup.mk (Text)"
  1115. sed 's/^X//' << 'SHAR_EOF' > unix/bsd43/uw/startup.mk &&
  1116. X# Generic UNIX DMAKE startup file.  Customize to suit your needs.
  1117. X# Should work for both SYSV, and BSD 4.3
  1118. X# See the documentation for a description of internally defined macros.
  1119. X#
  1120. X# Disable warnings for macros redefined here that were given
  1121. X# on the command line.
  1122. X__.SILENT := $(.SILENT)
  1123. X.SILENT   := yes
  1124. X
  1125. X# Configuration parameters for DMAKE startup.mk file
  1126. X# Set these to NON-NULL if you wish to turn the parameter on.
  1127. X_HAVE_RCS    := yes        # yes => RCS  is installed.
  1128. X_HAVE_SCCS    := yes        # yes => SCCS is installed.
  1129. X
  1130. X# Applicable suffix definitions
  1131. XA := .a        # Libraries
  1132. XE :=        # Executables
  1133. XF := .f        # Fortran
  1134. XO := .o        # Objects
  1135. XP := .p        # Pascal
  1136. XS := .s        # Assembler sources
  1137. XV := ,v        # RCS suffix
  1138. X
  1139. X# Recipe execution configurations
  1140. XSHELL        := /bin/sh
  1141. XSHELLFLAGS    := -ce
  1142. XGROUPSHELL    := $(SHELL)
  1143. XGROUPFLAGS    := 
  1144. XSHELLMETAS    := |();&<>?*][$$:\\#`'"
  1145. XGROUPSUFFIX    :=
  1146. XDIVFILE         = $(TMPFILE)
  1147. X
  1148. X# Standard C-language command names and flags
  1149. X   CPP       := /lib/cpp        # C-preprocessor
  1150. X   CC      := cc        # C-compiler and flags
  1151. X   CFLAGS  +=
  1152. X
  1153. X   AS      := as        # Assembler and flags
  1154. X   ASFLAGS += 
  1155. X
  1156. X   LD       = $(CC)        # Loader and flags
  1157. X   LDFLAGS +=
  1158. X   LDLIBS   =
  1159. X
  1160. X# Definition of $(MAKE) macro for recursive makes.
  1161. X   MAKE = $(MAKECMD) $(MFLAGS)
  1162. X
  1163. X# Definition of Print command for this system.
  1164. X   PRINT = lpr
  1165. X
  1166. X# Language and Parser generation Tools and their flags
  1167. X   YACC      := yacc        # standard yacc
  1168. X   YFLAGS +=
  1169. X   YTAB      := y.tab        # yacc output files name stem.
  1170. X
  1171. X   LEX      := lex        # standard lex
  1172. X   LFLAGS +=
  1173. X   LEXYY  := lex.yy        # lex output file
  1174. X
  1175. X# Other Compilers, Tools and their flags
  1176. X   PC    := pc            # pascal compiler
  1177. X   RC    := f77            # ratfor compiler
  1178. X   FC    := f77            # fortran compiler
  1179. X
  1180. X   CO       := co        # check out for RCS
  1181. X   COFLAGS += -q
  1182. X
  1183. X   AR     := ar            # archiver
  1184. X   ARFLAGS+= ruv
  1185. X
  1186. X   RM       := /bin/rm        # remove a file command
  1187. X   RMFLAGS +=
  1188. X
  1189. X# Implicit generation rules for making inferences.
  1190. X# We don't provide .yr or .ye rules here.  They're obsolete.
  1191. X# Rules for making *$O
  1192. X   %$O : %.c ; $(CC) -o $@ $(CFLAGS) -c $<
  1193. X   %$O : %$P ; $(PC) -o $@ $(PFLAGS) -c $<
  1194. X   %$O : %$S ; $(AS) -o $@ $(ASFLAGS) $<
  1195. X   %$O : %.cl ; class -c $<
  1196. X   %$O : %.e %.r %.F %$F
  1197. X    $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
  1198. X
  1199. X# Executables
  1200. X   %$E : %$O ; $(LD) $(LDFLAGS) -o $@ $< $(LDLIBES)
  1201. X
  1202. X# lex and yacc rules
  1203. X   %.c : %.y ; $(YACC)  $(YFLAGS) $<; mv $(YTAB).c $@
  1204. X   %.c : %.l ; $(LEX)   $(LFLAGS) $<; mv $(LEXYY).c $@
  1205. X
  1206. X# This rule tells how to make *.out from it's immediate list of prerequisites
  1207. X# UNIX only.
  1208. X   %.out :; $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
  1209. X
  1210. X# RCS support
  1211. X.IF $(_HAVE_RCS)
  1212. X   % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
  1213. X   .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
  1214. X.END
  1215. X
  1216. X# SCCS support
  1217. X.IF $(_HAVE_SCCS)
  1218. SHAR_EOF
  1219. echo "End of part 2"
  1220. echo "File unix/bsd43/uw/startup.mk is continued in part 3"
  1221. echo "3" > s2_seq_.tmp
  1222. exit 0
  1223.  
  1224.